#include "samplePlugin.h"
//this macro was defined in iPlugin.h file - it's used to export c++ constructor of the class.
IMPLEMENT_PLUGIN(samplePlugin)

void samplePlugin::PerformTasks()
{
	wxMessageBox(_("I would if I could..."));
}

wxWindow* samplePlugin::GetGUI(wxWindow* parent)
{
	wxWindow *dlg = new wxWindow(parent, wxID_ANY);

	wxBoxSizer* box = new wxBoxSizer(wxHORIZONTAL);
	wxButton* b = new wxButton(dlg,wxID_ANY,_("Some action in the plugin"));
	//Use connect in this case as static event tables won't work
	//As Plugin is derived from wxEvtHandler you can catch events in this Plugin
	b->Connect( wxID_ANY,
    wxEVT_COMMAND_BUTTON_CLICKED,
    wxCommandEventHandler(samplePlugin::OnButton),NULL,this
	);

	box->Add(b, 0, wxALIGN_CENTER|wxALL, 5 );
	dlg->SetSizer(box);
	dlg->Layout();
	return dlg;
}

void samplePlugin::OnButton(wxCommandEvent& e)
{
	wxMessageBox(_("Doing some action"));
}


wxString samplePlugin::getPluginName(){
	return wxT("SamplePluginORamma");
}
wxString samplePlugin::getIconFileName(){
	return wxT("NiftyIcon.pnm");
}
wxString samplePlugin::getTreeUID(){
	return wxT("ImCookooForCocoPuffs");
}
wxString samplePlugin::getTreePath(){
	return wxT("Examples/Samples/");
}
wxString samplePlugin::getTreeName(){
	return wxT("SamplePlugin1");
}
bool samplePlugin::hasDisplayTabGUI(){
	return false;
}
